# !/usr/bin/env python
# encoding: utf-8


"""
  @author: gaogao
  @file: calculate_util.py
  @time: 2022/7/4 15:11
  @desc:
"""

import numpy as np


# 计算平均值
def cal_mean(data_list):
    mean = np.mean(data_list)
    if mean:
        return mean


# 计算方差
def cal_variance(data_list):
    var = np.var(data_list)
    if var:
        return var
